/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mongoosehome.web.login.dao;

import com.mongoosehome.web.common.domain.TRole;
import java.util.List;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

/**
 *
 * @author Administrator
 */
public class RoleDaoIpml extends HibernateDaoSupport implements RoleDao{

    @Override
    public void saveRole(TRole role) {
        this.getHibernateTemplate().save(role);
    }

    @Override
    public TRole getMemberRankById(int id) {
        return (TRole) this.getHibernateTemplate().get(TRole.class, id);
    }

    @Override
    @SuppressWarnings("unchecked")
    public List<TRole> getAllRoles() {
        return getHibernateTemplate().find("from TRole");
    }
}
